/*
============================================================================
 Name        : dd_condition.h
 Author      : Jian
 Version     :
 Copyright   : GPL
 Description : dd_condition.h - header file
============================================================================
*/

#ifndef DD_CONDITION_H
#define DD_CONDITION_H

/* INCLUDES */
#include "sd_platform.h"

typedef struct __dd_condition dd_condition ;

struct __dd_condition {
    sd_semp*    qLock ;
    sd_semp*    readyLock ;
    int         waitCount ;
    int         error ;
};

dd_condition* dd_cont_create(sd_semp* qLock) ;

void dd_cont_destroy(dd_condition* cont) ;

int dd_cont_wait(dd_condition* cont) ;

int dd_cont_signal(dd_condition* cont) ;

int dd_cont_signal_all(dd_condition* cont) ;

#endif  /* DD_CONDITION_H */

/* End of File */
